import { defHttp } from "@/utils/http";
import { baseUrlApi } from "./utils";

export type DetailResult = {
  code: number;
  data: any;
  msg: string;
};

/** 修改仓库内库存调整备注 */
export const setWarehouseInventoryAdjustUpdate = (data?: object) => {
  return defHttp.post<DetailResult>({
    url: baseUrlApi("/warehouseInventoryAdjust/update"),
    data
  });
};

/** 仓库内库存调整列表带分页 */
export const getWarehouseInventoryAdjustPagelist = (data?: object) => {
  return defHttp.post<DetailResult>({
    url: baseUrlApi("/warehouseInventoryAdjust/pagelist"),
    data
  });
};

/** 仓库内库存调整物料明细 */
export const getWarehouseInventoryAdjustDetail = (data?: object) => {
  return defHttp.post<DetailResult>({
    url: baseUrlApi("/warehouseInventoryAdjust/detail"),
    data
  });
};

/** 新增仓库内库存调整 */
export const setWarehouseInventoryAdjustAdd = (data?: object) => {
  return defHttp.post<DetailResult>({
    url: baseUrlApi("/warehouseInventoryAdjust/add"),
    data
  });
};
